package com.teamfractal.fracdustry.common.item.init;

import com.teamfractal.fracdustry.common.block.init.FDBlocks;
import com.teamfractal.fracdustry.common.fluid.init.FDFluids;
import com.teamfractal.fracdustry.common.item.FDConsumableTool;
import com.teamfractal.fracdustry.common.item.FDFoilItem;
import com.teamfractal.fracdustry.common.item.impl.MagnifierItem;
import com.teamfractal.fracdustry.common.itemGroup.init.FDGroupInit;
import com.teamfractal.fracdustry.common.material.FDArmors;
import com.teamfractal.fracdustry.common.material.FDTools;
import com.teamfractal.fracdustry.common.util.FDRegistryHandler;
import net.minecraft.world.entity.EquipmentSlot;
import net.minecraft.world.item.*;
import net.minecraftforge.fmllegacy.RegistryObject;

public class FDItems
{
    public static RegistryObject<Item> bucketPetroleum;

    public static RegistryObject<Item> itemCopperDust;
    public static RegistryObject<Item> itemIronDust;
    public static RegistryObject<Item> itemGoldDust;

    public static RegistryObject<Item> itemAluminumDust;
    public static RegistryObject<Item> itemAluminumIngot;
    public static RegistryObject<Item> itemAluminumPlate;

    public static RegistryObject<Item> itemBronzeDust;
    public static RegistryObject<Item> itemBronzeIngot;
    public static RegistryObject<Item> itemBronzePlate;

    public static RegistryObject<Item> itemLithiumDust;
    public static RegistryObject<Item> itemLithiumIngot;

    public static RegistryObject<Item> itemSteelDust;
    public static RegistryObject<Item> itemSteelIngot;
    public static RegistryObject<Item> itemSteelPlate;

    public static RegistryObject<Item> itemTinDust;
    public static RegistryObject<Item> itemTinIngot;
    public static RegistryObject<Item> itemTinPlate;

    public static RegistryObject<Item> itemTitaniumDust;
    public static RegistryObject<Item> itemTitaniumIngot;
    public static RegistryObject<Item> itemTitaniumPlate;

    public static RegistryObject<Item> itemRareEarthDust;

    public static RegistryObject<Item> blockBauxiteOre;
    public static RegistryObject<Item> blockCassiteriteOre;
    public static RegistryObject<Item> blockIlmeniteOre;
    public static RegistryObject<Item> blockRareEarthOre;
    public static RegistryObject<Item> blockSpodumeneOre;

    public static RegistryObject<Item> blockDeepslateBauxiteOre;
    public static RegistryObject<Item> blockDeepslateCassiteriteOre;
    public static RegistryObject<Item> blockDeepslateIlmeniteOre;
    public static RegistryObject<Item> blockDeepslateRareEarthOre;
    public static RegistryObject<Item> blockDeepslateSpodumeneOre;

    public static RegistryObject<Item> armorSteelHelmet;
    public static RegistryObject<Item> armorSteelChestplate;
    public static RegistryObject<Item> armorSteelLeggings;
    public static RegistryObject<Item> armorSteelBoots;
    public static RegistryObject<Item> armorBronzeHelmet;
    public static RegistryObject<Item> armorBronzeChestplate;
    public static RegistryObject<Item> armorBronzeLeggings;
    public static RegistryObject<Item> armorBronzeBoots;

    public static RegistryObject<Item> toolBronzeSword;
    public static RegistryObject<Item> toolBronzeShovel;
    public static RegistryObject<Item> toolBronzePickaxe;
    public static RegistryObject<Item> toolBronzeAxe;
    public static RegistryObject<Item> toolBronzeHoe;
    public static RegistryObject<Item> toolSteelSword;
    public static RegistryObject<Item> toolSteelShovel;
    public static RegistryObject<Item> toolSteelPickaxe;
    public static RegistryObject<Item> toolSteelAxe;
    public static RegistryObject<Item> toolSteelHoe;

    public static RegistryObject<Item> spareToolHammer;
    public static RegistryObject<Item> spareToolHandsaw;
    public static RegistryObject<Item> spareToolPliers;
    public static RegistryObject<Item> spareToolMagnifier;

    public static RegistryObject<Item> toolHammer;
    public static RegistryObject<Item> toolHandsaw;
    public static RegistryObject<Item> toolPliers;
    public static RegistryObject<Item> toolMagnifier;

    public static RegistryObject<Item> blockCable;

    public static RegistryObject<Item> blockKineticGenerator;
    public static RegistryObject<Item> blockThermalGenerator;
    public static RegistryObject<Item> blockMicrowaveGenerator;
    public static RegistryObject<Item> blockSolarGenerator;
    public static RegistryObject<Item> blockVawt;

    public static RegistryObject<Item> blockElectricFurnace;
    public static RegistryObject<Item> blockOreProcessor;

    public static RegistryObject<Item> blockResearchDesk;

    public static void register()
    {
        //buckets
        bucketPetroleum = FDRegistryHandler.Items.register("petroleum_bucket",
                () -> new BucketItem(FDFluids.petroleumFluidStill, new Item.Properties().tab(FDGroupInit.FD_MATERIAL).craftRemainder(Items.BUCKET)));
        //Vanilla-relevant Materials
        itemCopperDust = FDRegistryHandler.Items.register("copper_dust",
                () -> new Item(new Item.Properties().tab(FDGroupInit.FD_MATERIAL)));
        itemIronDust = FDRegistryHandler.Items.register("iron_dust",
                () -> new Item(new Item.Properties().tab(FDGroupInit.FD_MATERIAL)));
        itemGoldDust = FDRegistryHandler.Items.register("gold_dust",
                () -> new Item(new Item.Properties().tab(FDGroupInit.FD_MATERIAL)));
        //Mod-relevant Materials
        itemAluminumDust = FDRegistryHandler.Items.register("aluminum_dust",
                () -> new Item(new Item.Properties().tab(FDGroupInit.FD_MATERIAL)));
        itemAluminumIngot = FDRegistryHandler.Items.register("aluminum_ingot",
                () -> new Item(new Item.Properties().tab(FDGroupInit.FD_MATERIAL)));
        itemAluminumPlate = FDRegistryHandler.Items.register("aluminum_plate",
                () -> new Item(new Item.Properties().tab(FDGroupInit.FD_MATERIAL)));
        itemBronzeDust = FDRegistryHandler.Items.register("bronze_dust",
                () -> new Item(new Item.Properties().tab(FDGroupInit.FD_MATERIAL)));
        itemBronzeIngot = FDRegistryHandler.Items.register("bronze_ingot",
                () -> new Item(new Item.Properties().tab(FDGroupInit.FD_MATERIAL)));
        itemBronzePlate = FDRegistryHandler.Items.register("bronze_plate",
                () -> new Item(new Item.Properties().tab(FDGroupInit.FD_MATERIAL)));
        itemLithiumDust = FDRegistryHandler.Items.register("lithium_dust",
                () -> new Item(new Item.Properties().tab(FDGroupInit.FD_MATERIAL)));
        itemLithiumIngot = FDRegistryHandler.Items.register("lithium_ingot",
                () -> new Item(new Item.Properties().tab(FDGroupInit.FD_MATERIAL)));
        itemSteelDust = FDRegistryHandler.Items.register("steel_dust",
                () -> new Item(new Item.Properties().tab(FDGroupInit.FD_MATERIAL)));
        itemSteelIngot = FDRegistryHandler.Items.register("steel_ingot",
                () -> new Item(new Item.Properties().tab(FDGroupInit.FD_MATERIAL)));
        itemSteelPlate = FDRegistryHandler.Items.register("steel_plate",
                () -> new Item(new Item.Properties().tab(FDGroupInit.FD_MATERIAL)));
        itemTinDust = FDRegistryHandler.Items.register("tin_dust",
                () -> new Item(new Item.Properties().tab(FDGroupInit.FD_MATERIAL)));
        itemTinIngot = FDRegistryHandler.Items.register("tin_ingot",
                () -> new Item(new Item.Properties().tab(FDGroupInit.FD_MATERIAL)));
        itemTinPlate = FDRegistryHandler.Items.register("tin_plate",
                () -> new Item(new Item.Properties().tab(FDGroupInit.FD_MATERIAL)));
        itemTitaniumDust = FDRegistryHandler.Items.register("titanium_dust",
                () -> new Item(new Item.Properties().tab(FDGroupInit.FD_MATERIAL)));
        itemTitaniumIngot = FDRegistryHandler.Items.register("titanium_ingot",
                () -> new Item(new Item.Properties().tab(FDGroupInit.FD_MATERIAL)));
        itemTitaniumPlate = FDRegistryHandler.Items.register("titanium_plate",
                () -> new Item(new Item.Properties().tab(FDGroupInit.FD_MATERIAL)));
        itemRareEarthDust = FDRegistryHandler.Items.register("rare_earth_dust",
                () -> new Item(new Item.Properties().tab(FDGroupInit.FD_MATERIAL)));

        //Armors & Tools
        armorSteelHelmet = FDRegistryHandler.Items.register("steel_armor_helmet",
                () -> new ArmorItem(FDArmors.STEEL, EquipmentSlot.HEAD, (new Item.Properties()).tab(FDGroupInit.FD_TOOLS)));
        armorSteelChestplate = FDRegistryHandler.Items.register("steel_armor_chestplate",
                () -> new ArmorItem(FDArmors.STEEL, EquipmentSlot.CHEST, (new Item.Properties()).tab(FDGroupInit.FD_TOOLS)));
        armorSteelLeggings = FDRegistryHandler.Items.register("steel_armor_leggings",
                () -> new ArmorItem(FDArmors.STEEL, EquipmentSlot.LEGS, (new Item.Properties()).tab(FDGroupInit.FD_TOOLS)));
        armorSteelBoots = FDRegistryHandler.Items.register("steel_armor_boots",
                () -> new ArmorItem(FDArmors.STEEL, EquipmentSlot.FEET, (new Item.Properties()).tab(FDGroupInit.FD_TOOLS)));
        armorBronzeHelmet = FDRegistryHandler.Items.register("bronze_armor_helmet",
                () -> new ArmorItem(FDArmors.BRONZE, EquipmentSlot.HEAD, (new Item.Properties()).tab(FDGroupInit.FD_TOOLS)));
        armorBronzeChestplate = FDRegistryHandler.Items.register("bronze_armor_chestplate",
                () -> new ArmorItem(FDArmors.BRONZE, EquipmentSlot.CHEST, (new Item.Properties()).tab(FDGroupInit.FD_TOOLS)));
        armorBronzeLeggings = FDRegistryHandler.Items.register("bronze_armor_leggings",
                () -> new ArmorItem(FDArmors.BRONZE, EquipmentSlot.LEGS, (new Item.Properties()).tab(FDGroupInit.FD_TOOLS)));
        armorBronzeBoots = FDRegistryHandler.Items.register("bronze_armor_boots",
                () -> new ArmorItem(FDArmors.BRONZE, EquipmentSlot.FEET, (new Item.Properties()).tab(FDGroupInit.FD_TOOLS)));

        spareToolHammer = FDRegistryHandler.Items.register("sp_hammer",
                () -> new FDFoilItem(new Item.Properties().tab(FDGroupInit.FD_MATERIAL),true,"tooltips.fracdustry.spare_tools_or_items"));
        spareToolHandsaw = FDRegistryHandler.Items.register("sp_handsaw",
                () -> new FDFoilItem(new Item.Properties().tab(FDGroupInit.FD_MATERIAL),true,"tooltips.fracdustry.spare_tools_or_items"));
        spareToolMagnifier = FDRegistryHandler.Items.register("sp_magnifier",
                () -> new FDFoilItem(new Item.Properties().tab(FDGroupInit.FD_MATERIAL),true,"tooltips.fracdustry.spare_tools_or_items"));
        spareToolPliers = FDRegistryHandler.Items.register("sp_pliers",
                () -> new FDFoilItem(new Item.Properties().tab(FDGroupInit.FD_MATERIAL),true,"tooltips.fracdustry.spare_tools_or_items"));

        toolSteelShovel = FDRegistryHandler.Items.register("steel_shovel",
                () -> new ShovelItem(FDTools.STEEL,-2,-2.8f,new Item.Properties().tab(FDGroupInit.FD_TOOLS)));
        toolSteelPickaxe =  FDRegistryHandler.Items.register("steel_pickaxe",
                () -> new PickaxeItem(FDTools.STEEL,1,-2.8f,new Item.Properties().tab(FDGroupInit.FD_TOOLS)));
        toolSteelAxe =  FDRegistryHandler.Items.register("steel_axe",
                () -> new AxeItem(FDTools.STEEL,5f,-3.2f,new Item.Properties().tab(FDGroupInit.FD_TOOLS)));
        toolSteelHoe =  FDRegistryHandler.Items.register("steel_hoe",
                () -> new HoeItem(FDTools.STEEL,-2,-2.8f,new Item.Properties().tab(FDGroupInit.FD_TOOLS)));
        toolSteelSword =  FDRegistryHandler.Items.register("steel_sword",
                () -> new SwordItem(FDTools.STEEL,3,-2.4f,new Item.Properties().tab(FDGroupInit.FD_TOOLS)));
        toolBronzeShovel = FDRegistryHandler.Items.register("bronze_shovel",
                () -> new ShovelItem(FDTools.BRONZE,-2,-2.8f,new Item.Properties().tab(FDGroupInit.FD_TOOLS)));
        toolBronzePickaxe =  FDRegistryHandler.Items.register("bronze_pickaxe",
                () -> new PickaxeItem(FDTools.BRONZE,1,-2.8f,new Item.Properties().tab(FDGroupInit.FD_TOOLS)));
        toolBronzeAxe =  FDRegistryHandler.Items.register("bronze_axe",
                () -> new AxeItem(FDTools.BRONZE,6f,-3.1f,new Item.Properties().tab(FDGroupInit.FD_TOOLS)));
        toolBronzeHoe =  FDRegistryHandler.Items.register("bronze_hoe",
                () -> new HoeItem(FDTools.BRONZE,-2,-2.8f,new Item.Properties().tab(FDGroupInit.FD_TOOLS)));
        toolBronzeSword =  FDRegistryHandler.Items.register("bronze_sword",
                () -> new SwordItem(FDTools.BRONZE,3,-2.4f,new Item.Properties().tab(FDGroupInit.FD_TOOLS)));
        toolHammer = FDRegistryHandler.Items.register("hammer",
                () -> new FDConsumableTool(FDTools.IRON_LIKE,6,-3.1F,new Item.Properties().tab(FDGroupInit.FD_TOOLS)));
        toolHandsaw = FDRegistryHandler.Items.register("handsaw",
                () -> new FDConsumableTool(FDTools.IRON_LIKE,3,-2.6F,new Item.Properties().tab(FDGroupInit.FD_TOOLS)));
        toolMagnifier = FDRegistryHandler.Items.register("magnifier",
                () -> new MagnifierItem(new Item.Properties().tab(FDGroupInit.FD_TOOLS).stacksTo(1)));
        toolPliers = FDRegistryHandler.Items.register("pliers",
                () -> new FDConsumableTool(FDTools.IRON_LIKE,0,-2.4F,new Item.Properties().tab(FDGroupInit.FD_TOOLS)));

        //Oreblocks
        blockBauxiteOre = FDRegistryHandler.Items.register("bauxite_ore"
                , () -> new BlockItem(FDBlocks.blockBauxiteOre.get(),new Item.Properties().tab(FDGroupInit.FD_MATERIAL)));
        blockCassiteriteOre = FDRegistryHandler.Items.register("cassiterite_ore"
                , () -> new BlockItem(FDBlocks.blockCassiteriteOre.get(),new Item.Properties().tab(FDGroupInit.FD_MATERIAL)));
        blockIlmeniteOre = FDRegistryHandler.Items.register("ilmenite_ore"
                , () -> new BlockItem(FDBlocks.blockIlmeniteOre.get(),new Item.Properties().tab(FDGroupInit.FD_MATERIAL)));
        blockRareEarthOre = FDRegistryHandler.Items.register("rare_earth_ore"
                , () -> new BlockItem(FDBlocks.blockRareEarthOre.get(),new Item.Properties().tab(FDGroupInit.FD_MATERIAL)));
        blockSpodumeneOre = FDRegistryHandler.Items.register("spodumene_ore"
                , () -> new BlockItem(FDBlocks.blockSpodumeneOre.get(),new Item.Properties().tab(FDGroupInit.FD_MATERIAL)));
        blockDeepslateBauxiteOre = FDRegistryHandler.Items.register("deepslate_bauxite_ore"
                , () -> new BlockItem(FDBlocks.blockDeepslateBauxiteOre.get(),new Item.Properties().tab(FDGroupInit.FD_MATERIAL)));
        blockDeepslateCassiteriteOre = FDRegistryHandler.Items.register("deepslate_cassiterite_ore"
                , () -> new BlockItem(FDBlocks.blockDeepslateCassiteriteOre.get(),new Item.Properties().tab(FDGroupInit.FD_MATERIAL)));
        blockDeepslateIlmeniteOre = FDRegistryHandler.Items.register("deepslate_ilmenite_ore"
                , () -> new BlockItem(FDBlocks.blockDeepslateIlmeniteOre.get(),new Item.Properties().tab(FDGroupInit.FD_MATERIAL)));
        blockDeepslateRareEarthOre = FDRegistryHandler.Items.register("deepslate_rare_earth_ore"
                , () -> new BlockItem(FDBlocks.blockDeepslateRareEarthOre.get(),new Item.Properties().tab(FDGroupInit.FD_MATERIAL)));
        blockDeepslateSpodumeneOre = FDRegistryHandler.Items.register("deepslate_spodumene_ore"
                , () -> new BlockItem(FDBlocks.blockDeepslateSpodumeneOre.get(),new Item.Properties().tab(FDGroupInit.FD_MATERIAL)));

        //machinery relevant
        blockCable = FDRegistryHandler.Items.register("cable"
                , () -> new BlockItem(FDBlocks.blockCable.get(), new Item.Properties().tab(FDGroupInit.FD_MACHINERY)));
        blockKineticGenerator = FDRegistryHandler.Items.register("kinetic_generator"
                , () -> new BlockItem(FDBlocks.blockKineticGenerator.get(), new Item.Properties().tab(FDGroupInit.FD_MACHINERY)));
        blockThermalGenerator = FDRegistryHandler.Items.register("thermal_generator"
                , () -> new BlockItem(FDBlocks.blockThermalGenerator.get(), new Item.Properties().tab(FDGroupInit.FD_MACHINERY)));
        blockMicrowaveGenerator = FDRegistryHandler.Items.register("microwave_generator"
                , () -> new BlockItem(FDBlocks.blockMicrowaveGenerator.get(), new Item.Properties().tab(FDGroupInit.FD_MACHINERY)));
        blockSolarGenerator = FDRegistryHandler.Items.register("solar_generator"
                , () -> new BlockItem(FDBlocks.blockSolarGenerator.get(), new Item.Properties().tab(FDGroupInit.FD_MACHINERY)));
        blockVawt = FDRegistryHandler.Items.register("vawt"
                , () -> new BlockItem(FDBlocks.blockVawt.get(), new Item.Properties().tab(FDGroupInit.FD_MACHINERY)));

        blockElectricFurnace = FDRegistryHandler.Items.register("electric_furnace"
                , () -> new BlockItem(FDBlocks.blockElectricFurnace.get(), new Item.Properties().tab(FDGroupInit.FD_MACHINERY)));
        blockOreProcessor = FDRegistryHandler.Items.register("ore_processor"
                , () -> new BlockItem(FDBlocks.blockOreProcessor.get(), new Item.Properties().tab(FDGroupInit.FD_MACHINERY)));
        blockResearchDesk = FDRegistryHandler.Items.register("research_desk"
                , () -> new BlockItem(FDBlocks.blockResearchDesk.get(), new Item.Properties().tab(FDGroupInit.FD_RESEARCH)));
    }

}
